﻿using UnityEngine;  
using System.Collections;  
  
public class MoveCurve : MonoBehaviour {  

	public GameObject t1;    
	public GameObject t2;     
	// Update is called once per frame  
	void Update () {  
		Vector3 center = (t1.transform .position + t2.transform.position) * 0.5f;  
		center -= new Vector3(0, 1, 0);  
		Vector3 start = t1.transform.position - center;  
		Vector3 end = t2.transform.position - center;    
		transform.position = Vector3.Slerp(start,end,Time.time);  
		transform.position += center;  
	}  
}  
